package com.lovegu.basic;

/**
 * @author 老顾
 * @title: StringTest
 * @projectName java-restudy
 * @email: 1437594522@qq.com
 * @date 2022/9/20 15:05
 */
public class StringTest {
    public static void main(String[] args) {
        int no = 10;
        String str = "abcdef";
        String str1 = str + "xyz" + no;

        str1 = str1 + "123";
        char c = '国';

        double pi = 3.1416;
        str1 = str1 + pi;
        boolean b = false;
        str1 = str1 + b;
        str1 = str1 + c;

        System.out.println("str1 = " + str1);
        String str2 = 3.5f + ""; //判断str2对错：yes
        System.out.println(str2); //输出：”3.5”
        System.out .println(3+4+"Hello!"); //输出：7Hello!
        System.out.println("Hello!"+3+4); //输出：Hello!34
        System.out.println('a'+1+"Hello!"); //输出：98Hello!
        System.out.println("Hello"+'a'+1); //输出：Helloa1
    }
}
